package com.smartown.android

import android.os.Bundle
import android.view.View
import android.widget.TextView
import com.blankj.utilcode.util.NetworkUtils
import win.smartown.android.R
import win.smartown.android.base.BaseActivity

class MainActivity : BaseActivity(), View.OnClickListener {
    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.click -> showSnackBar("${(v as TextView).text}")
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setBaseContentView(R.layout.activity_main)
        var textView: TextView = findView(R.id.click)
        textView.text = "${NetworkUtils.getNetworkType()}"
        findView<View>(R.id.click).setOnClickListener(this)
    }

}
